package com.sc.nft.entity.vo.mall;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

@Data
public class AdminMallOrderProductDetailsVO {

    @ApiModelProperty("商品编码")
    private String productCode;

    @ApiModelProperty("商品名称")
    private String productName;

    @ApiModelProperty("缩略图")
    private String thumbnail;

    @ApiModelProperty("活动编码")
    private String specsCode;

    @ApiModelProperty("商品规格名称")
    private String productSpecsName;

    @ApiModelProperty("成本价")
    private String productCostPrice;

    @ApiModelProperty(value = "活动成本价")
    private BigDecimal activityCostPrice;

    @ApiModelProperty(value = "托底价")
    private BigDecimal reservePrice;

    @ApiModelProperty("售价")
    private String productSalesPrice;

    @ApiModelProperty("商品数量")
    private Integer productNum;

    @ApiModelProperty("推广佣金")
    private String profit;

    @ApiModelProperty(value = "发货编码")
    private String sendCode;

    @ApiModelProperty("利润")
    private BigDecimal activityProfit;

    @ApiModelProperty("分润模版ID")
    private Long profitTemplateId;

    @ApiModelProperty("分润模版名称")
    private String profitTemplateName;

    public void setProductSalesPrice(BigDecimal productSalesPrice) {
        this.productSalesPrice = productSalesPrice.setScale(2,BigDecimal.ROUND_DOWN).toPlainString();
    }

    public void setProductCostPrice(BigDecimal productCostPrice) {
        this.productCostPrice = productCostPrice.setScale(2,BigDecimal.ROUND_DOWN).toPlainString();
    }

    public void setProfit(BigDecimal profit) {
        this.profit = profit.setScale(2,BigDecimal.ROUND_DOWN).toPlainString();
    }
}
